<template>
  <div id="app">
    <div id="main" style="width: 700px; height: 550px;"></div>
  </div>
</template>


<script>
export default {
  name: "FuncFormsBase",
  data() {
    return {
      msg: "Welcome to Your Vue.js App",
    };
  },
  mounted() {
    this.drawLine();
  },
  methods: {
    drawLine() {
      var echarts = require("echarts");
      var myChart = echarts.init(document.getElementById("main"));
      myChart.setOption({
        legend: {
          top: "bottom",
        },
        toolbox: {
          show: true,
          feature: {
            mark: { show: true },
            dataView: { show: true, readOnly: false },
            restore: { show: true },
            saveAsImage: { show: true },
          },
        },
        series: [
          {
            name: "Nightingale Chart",
            type: "pie",
            radius: [50, 250],
            center: ["50%", "50%"],
            roseType: "area",
            itemStyle: {
              borderRadius: 8,
            },
            data: [
              { value: 40, name: " 用户" },
              { value: 30, name: " 扶贫政策" },
              { value: 22, name: " 贫困户" },
              { value: 30, name: " 留言板" },
              { value: 68, name: " 收藏表" },
              { value: 26, name: " 轮播图" },
            ],
          },
        ],
      });
    },
  },
};
</script>

<style>
#app{
  justify-content: center;
  align-items: center;
}
#main{
  margin: 0 auto;
}
</style>